package dk.oldommer.bjw.model.user;

import java.util.List;

public interface UserFacade {
	/**
	 * Create a user from specified properties
	 * @param userValues Attributes of new User
	 * @return User object representing the persisted User
	 * @throws FacadeException
	 */
	public User create(UserValues userValues) throws FacadeException;

	/**
	 * Create a list of all users
	 * @return A List of User's
	 * @throws FacadeException
	 */
	public List<User> findAll() throws FacadeException;

	/**
	 * Load user from database
	 * @param id Id of user to load
	 * @throws FacadeException
	 */
	public User get(Long id) throws FacadeException;

	/**
	 * Update a User with new property values
	 * @param id Id of user to update, must exist in database
	 * @param userValues Values to update with
	 * @throws FacadeException
	 */
	public void save(Long id, UserValues userValues) throws FacadeException;

}
